<script>
export default {
	onLaunch: function () {
		console.log('App Launch')
		// 初始化存储
		this.$store.dispatch('initUserInfo')
		// #ifdef APP-PLUS
		plus.screen.lockOrientation('portrait-primary')
		plus.navigator.closeSplashscreen()
		// #endif
		uni.onNetworkStatusChange((res) => {
			console.log(res)
			this.$store.dispatch('setNetworkType', res.networkType)
		})
	},
	onShow: function () {
		this.$store
			.dispatch('checkNetwork')
			.then(() => {
				// 有网络状态
			})
			.catch(() => {
				// 无网络状态
			})
	},
	onHide: function () {
		console.log('App Hide')
	},
}
</script>

<style>
/*每个页面公共css */
@import '@/static/iconfont/iconfont.css';
</style>
